﻿using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;

using XunPan.Web.Globals;
using System.Web.Security;
using SalePartial.Utility;


partial class basePage : System.Web.UI.MasterPage
{


	protected void Page_Load(object sender, System.EventArgs e)
	{

		if (!IsPostBack) {


		}
	}


	protected void hlkLogin_LoggingOut(object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
	{
		if (string.IsNullOrEmpty(Page.User.Identity.Name)) {
			Response.Redirect("~/Error.aspx?ErrCode=3");
		}
	}

    public basePage()
	{
		Load += Page_Load;
	}

	//Protected Sub radMenuNavi_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles radMenuNavi.ItemClick
	//    Select Case e.Item.Value
	//        Case "xunpan"
	//            '询盘
	//            If Roles.IsUserInRole(Page.User.Identity.Name, "Purchase") Then
	//                Response.Redirect("~/trade/events/event_grid.aspx", True)

	//            End If
	//            If Roles.IsUserInRole(Page.User.Identity.Name, "Suppliers") Then
	//                Response.Redirect("~/trade/events/event_list.aspx", True)

	//            End If
	//        Case "publish"
	//            If Roles.IsUserInRole(Page.User.Identity.Name, "Purchase") Then
	//                Response.Redirect("~/trade/trade_item.aspx", True)
	//            End If

	//        Case "inbox"
	//            Response.Redirect("~/trade/inbox/inbox_list.aspx", True)

	//        Case "resource"
	//            If Roles.IsUserInRole(Page.User.Identity.Name, "Purchase") Then
	//                Response.Redirect("~/trade/resource/vendor_retrieval.aspx", True)

	//            End If
	//            If Roles.IsUserInRole(Page.User.Identity.Name, "Suppliers") Then
	//                Response.Redirect("~/trade/resource/trade_retrieval.aspx", True)

	//            End If
	//        Case "warecube"
	//            '零部件库

	//        Case "account"
	//            '帐户管理
	//            Dim urlTemp As String = "~/user/account/profile.aspx"
	//            If Page.User.Identity.Name <> "" Then
	//                Response.Redirect(urlTemp)
	//            Else
	//                Response.Redirect("~/Error.aspx?ErrCode=3&url=" + urlTemp)
	//            End If
	//        Case "management"
	//            '网站管理

	//        Case "home"
	//            Response.Redirect(GlobalSetting.UrlHomePage)

	//        Case Else


	//    End Select

	//End Sub
}
